﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HATerrain
{

    /// <summary>
    /// 用于表示网格的一些基本信息，付
    /// </summary>
    [Serializable ]
    public class TerrainGridInfo
    {

        # region 数据字段



        private double _dataMin = -9999;  //高程数据最小值

        private double _dataMax = -9999;  //高程数据最大值

        private double _noDataValue = -9999;  //无效值

        private int _sizeX = 0;  //网格行数

        private int _sizeY = 0;  //网格列数

        private double _cellSizeX = 0;

        private double _cellSizeY = 0;

        private double[] _affine = new double[6];

        private TerrainUnitEnum _unit = TerrainUnitEnum.meters;  //坐标系单位      

        private HAPoint _coordinateNW = new HAPoint();  //地形图西北角坐标       

        private HAPoint _coordinateNE = new HAPoint();  //地形图东北角坐标

        private HAPoint _coordinateSE = new HAPoint();  //地形图东南角坐标      

        private HAPoint _coordinateSW = new HAPoint();  //地形图西南角坐标

        private string _projection = "";  //投影系统

        protected int _zone;  //utm区

        private int _pixelSpace = 0; //gdal数据的一个参数，基本没用，常按0使用！ Mapwindow的解释

        private int _lineSpace = 0; //gdal数据的一个参数，基本没用，常按0使用！ Mapwindow的解释



        # endregion



        # region 数据属性



        /// <summary>
        /// 高程数据最小值
        /// </summary>
        public double DataMin
        {
            get { return _dataMin; }
            set { _dataMin = value; }
        }

        /// <summary>
        /// 高程数据最大值
        /// </summary>
        public double DataMax
        {
            get { return _dataMax; }
            set { _dataMax = value; }
        }

        /// <summary>
        /// 无效值
        /// </summary>
        public double NoDataValue
        {
            get { return _noDataValue; }
            set { _noDataValue = value; }
        }

        /// <summary>
        /// 网格行数
        /// </summary>
        public int SizeX
        {
            get { return _sizeX; }
            set { _sizeX = value; }
        }

        /// <summary>
        /// 网格列数
        /// </summary>
        public int SizeY
        {
            get { return _sizeY; }
            set { _sizeY = value; }
        }

        /// <summary>
        /// 网格X间距
        /// </summary>
        public double CellSizeX
        {
            get { return _cellSizeX; }
            set { _cellSizeX = value; }
        }


        /// <summary>
        /// 网格Y间距
        /// </summary>
        public double CellSizeY
        {
            get { return _cellSizeY; }
            set { _cellSizeY = value; }
        }


        /// <summary>
        /// 
        /// </summary>
        public double[] Affine
        {
            get { return _affine; }
            set { _affine = value; }
        }

        /// <summary>
        /// 坐标系单位
        /// </summary>
        public TerrainUnitEnum Unit
        {
            get { return _unit; }
            set { _unit = value; }
        }

        /// <summary>
        /// 地形图西北角坐标
        /// </summary>
        public HAPoint CoordinateNW
        {
            get { return _coordinateNW; }
            set { _coordinateNW = value; }
        }


        /// <summary>
        /// 地形图东北角坐标
        /// </summary>
        public HAPoint CoordinateNE
        {
            get { return _coordinateNE; }
            set { _coordinateNE = value; }
        }

        /// <summary>
        /// 地形图东南角坐标
        /// </summary>
        public HAPoint CoordinateSE
        {
            get { return _coordinateSE; }
            set { _coordinateSE = value; }
        }

        /// <summary>
        /// 地形图西南角坐标
        /// </summary>
        public HAPoint CoordinateSW
        {
            get { return _coordinateSW; }
            set { _coordinateSW = value; }
        }

        /// <summary>
        /// 投影系统
        /// </summary>
        public string Projection
        {
            get { return _projection; }
            set { _projection = value; }
        }

        /// <summary>
        /// utm区
        /// </summary>
        public int Zone
        {
            get { return _zone; }
            set { _zone = value; }
        }


        public int PixelSpace
        {
            get { return _pixelSpace; }
            set { _pixelSpace = value; }
        }


        public int LineSpace
        {
            get { return _lineSpace; }
            set { _lineSpace = value; }
        }

        # endregion


    }
}
